package com.atguigu.factorybean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestUser {

    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-factorybean.xml");
        // 最终我们得到的对象是类中的getObject()返回的类型
        User user = (User) context.getBean("user");
        System.out.println(user);
    }
}
